.TH std::basic_syncbuf::emit 3 "2024.06.10" "http://cppreference.com" "C++ Standard Libary"
.SH NAME
std::basic_syncbuf::emit \- std::basic_syncbuf::emit

.SH Synopsis
   bool emit();

   Atomically transmits all pending output to the wrapped stream.

   All emit() calls transferring characters to the same wrapped stream buffer object
   appear to execute in a total order, where each emit() call synchronizes-with
   subsequent emit() calls in that total order, even if these calls are made through
   difference instances of std::basic_syncbuf/std::basic_osyncstream. In practice, this
   means that emit() takes a lock uniquely associated with the wrapped stream object:
   for example, it could be held in a static hash map where the address of the wrapped
   stream is used as the key.

   If a call had been made to sync since the last call to emit(), then also flushes the
   wrapped stream by calling pubsync() on it.

.SH Parameters

   \fI(none)\fP

.SH Return value

   true if all of the following is true:

     * there is a wrapped stream (the wrapped streambuf pointer is not null)
     * all characters from the temporary storage were successfully sent into the
       wrapped stream
     * the call to pubsync(), if requested, also completed successfully.

   Returns false otherwise.

.SH Notes

   Normally called by the destructor or move assignment of the owning
   std::basic_osyncstream, or by std::basic_osyncstream::emit.

.SH Example

    This section is incomplete
    Reason: no example

.SH See also

                 destroys the basic_osyncstream and emits its internal buffer
   destructor    \fI\fI(public member\fP function of\fP
                 std::basic_osyncstream<CharT,Traits,Allocator>)
                 calls emit() on the underlying basic_syncbuf to transmit its internal
   emit          data to the final destination
                 \fI\fI(public member\fP function of\fP
                 std::basic_osyncstream<CharT,Traits,Allocator>)
   constructor   constructs a basic_syncbuf object
                 \fI(public member function)\fP

.SH Category:
     * Todo no example
